package com.fs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("orders")
public class Order extends BasePojo implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer userId;   //用户id
    private String orderNo;   //订单单号
    private Integer price;    //订单总价格，分
    private Integer num;      //订单总数量
    private Integer status;   //订单状态: 0未付款，1已付款，2超时作废
    private Integer receiving; //0未发货，1已发货运输中，2已收货，3申请退货，4同意退货，5已退货
    private Date created;
    private Date updated;
    private Integer addrId;   //收货信息id
    private String msg;       //用户留言
    @TableField(exist = false)
    private String username;
}
